80206: Function test xfi:s-equal-set

Documentation

Tests of function xfi:s-equal-set($left as node()*, $right as node()*) as xs:boolean

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00
Richard Ashby CoreFiling Ltd rna@corefiling.com 30-11-2012 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670708

Test Case Variations


V-01 Returns s-equality of nodes equal and in order, argument as a set left and right in same order

Documentation

Inputs

  • schema: s-equal2.xsd
  • linkbase: s-equal2-definition.xml
  • instance: s-equal2-instance.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:s-equal-set( (//xbrli:context[@id='c-V01-left'],//t:P1[@id='V01-left']), (//xbrli:context[@id='c-V01-right'],//t:P1[@id='V01-right']) )

    (against file V01)

Outputs

  • Result test: $result instance of xs:boolean and count( $result ) eq 1 and $result eq true()

V-01a Returns s-equality of nodes equal and in order, sets in different order

Documentation

Inputs

  • schema: s-equal2.xsd
  • linkbase: s-equal2-definition.xml
  • instance: s-equal2-instance.xml (DTS Discovery starting point) (ID=V01a)
  • Function Call: xfi:s-equal-set( (//xbrli:context[@id='c-V01-left'],//t:P1[@id='V01-left']), (//t:P1[@id='V01-right'],//xbrli:context[@id='c-V01-right']) )

    (against file V01a)

Outputs

  • Result test: $result instance of xs:boolean and count( $result ) eq 1 and $result eq true()

V-02 Same as V-01 but typed dimension elements and set elements in different order

Documentation

Inputs

  • schema: s-equal2.xsd
  • linkbase: s-equal2-definition.xml
  • instance: s-equal2-instance.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:s-equal-set( (//xbrli:context[@id='c-V01-left'],//t:P1[@id='V01-left']), (//t:P1[@id='V03-right'],//xbrli:context[@id='c-V03-right']) )

    (against file V02)

Outputs

  • Result test: $result instance of xs:boolean and count( $result ) eq 1 and $result eq false()

V-03 Same as V-01 but arguments are sequences

Documentation

Inputs

  • schema: s-equal2.xsd
  • linkbase: s-equal2-definition.xml
  • instance: s-equal2-instance.xml (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:s-equal-set( ( //xbrli:context[@id='c-V01-left'], //t:P3[@id eq 'V02-left']), ( //xbrli:context[@id='c-V01-right'], //t:P3[@id eq 'V02-left']) )

    (against file V03)

Outputs

  • Result test: $result instance of xs:boolean and count( $result ) eq 1 and $result eq true()

V-04 Same as V-01 but arguments are sequences not same length

Documentation

Inputs

  • schema: s-equal2.xsd
  • linkbase: s-equal2-definition.xml
  • instance: s-equal2-instance.xml (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:s-equal-set( ( //xbrli:context[@id='c-V01-left'], //t:P3[@id eq 'V02-left']), ( //xbrli:context[@id='c-V03-right'] ) )

    (against file V04)

Outputs

  • Result test: $result instance of xs:boolean and count( $result ) eq 1 and $result eq false()

V-05 Wrong node to function

Documentation

XPath-defined error for node type incorrect.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-06 Wrong number of arguments

Documentation

XPath-defined error for node type incorrect number of arguments.

Inputs

Outputs

  • Error code: xqt-err:XPST0017

V-07 Performs set de-duplication of sequences

Documentation

Works for sequences containing duplicate entries, which are equal when compared as sets

Inputs

  • schema: s-equal2.xsd
  • linkbase: s-equal2-definition.xml
  • instance: s-equal2-instance.xml (DTS Discovery starting point) (ID=V07)
  • Function Call: xfi:s-equal-set( ( //t:P3[@id='V08-left'], //t:P3[@id='V02-left']), ( //t:P3[@id='V08-left'], //t:P3[@id='V02-left'], //t:P3[text() eq 'V02-value']) )

    (against file V07)

Outputs

  • Result test: $result eq true()

Revisions

Name On Details
Herm Fischer 19-02-2008 at 00:00:00 Created the test case.
Herm Fischer 31-01-2010 at 10:30:00 Removed id attributes in variations v-01 - v-04 per bug 378.
Richard Ashby 30-11-2012 at 00:00:00 Added variation confirming de-duplication of sequences into sets.